home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / vpi1_330.zip / MENU1.PRG < prev    next >
Text File  |  1991-12-31  |  2KB  |  68 lines

  1. ***************************************************************************
  2. **  MENU1.PRG
  3. **  (C) Copyright 1990-92, Sub Rosa Publishing Inc.
  4. **
  5. **  A demonstration program provided to VP-Info users.
  6. **  This program may be copied freely. If it is used in commercial code,
  7. **  please credit the source, Sub Rosa Publishing Inc.
  8. **
  9. **  MENU1 demonstrates the use of the MENU() function along with a variety
  10. **  of Info commands and functions.
  11. **
  12. **  MENU1 displays a menu, determines the choice made, and reports
  13. **  the selection.
  14. **
  15. **  MENU1 is compatible with all current versions of VP-Info.
  16. **
  17. **  Sid Bursten and Bernie Melman
  18. ***************************************************************************
  19. window                        ;set window to full screen 
  20. erase                         ;erase screen
  21. WINDOW 6,18,19,62 DOUBLE      ;declare space for menu text
  22. DO WHILE 1=1                  ;put main menu in an infinite loop
  23.    ERASE                      ;clear window
  24.    TEXT
  25.  
  26.            SAMPLE MAIN MENU
  27.  
  28.     0. Exit to Sample Programs Menu
  29.  
  30.     1. Branch 1 of sample program
  31.     2. Branch 2 of sample program
  32.     3. Branch 3 of sample program
  33.     4. Branch 4 of sample program
  34.     5. Exit to Conversational VP-Info
  35.     6. Return to Main Demonstration Menu
  36.    ENDTEXT
  37.    CURSOR 12,25 ; positions menu cursor over 1st character of 1st choice
  38.    selection=menu(6,37)      ;six choices menu bar width 37
  39.    DO CASE
  40.    CASE selection=0
  41.       CHAIN samples
  42.    CASE selection=1
  43.       @ 20,21 say " You have selected option 1. "
  44.       RING
  45.       DELAY 1 ; wait one second
  46.    CASE selection=2
  47.       @ 20,21 say " You have selected option 2. "
  48.       RING
  49.       DELAY 1 ; wait one second
  50.    CASE selection=3
  51.       @ 20,21 say " You have selected option 3. "
  52.       RING
  53.       DELAY 1 ; wait one second
  54.    CASE selection=4
  55.       @ 20,21 say " You have selected option 4. "
  56.       RING
  57.       DELAY 1 ; wait one second
  58.    CASE selection=5
  59.       WINDOW                  ;reset window to full screen
  60.       ERASE                   ;clear screen
  61.       CANCEL
  62.    CASE selection=6
  63.       CHAIN demo
  64.    ENDCASE
  65. ENDDO
  66. *
  67. *                         *** end of MENU1.PRG ***
  68.